<p>Thông tin bài thơ</p>
<?php
// echo "<pre>"; var_dump($poetic->caption);die;
?>
<form method="post" action="">
<table class="table table-condensed" style="width: 100%;">
    <tr>
        <td style="vertical-align: middle; width: 100px;">
            <label for="danh_muc">Danh mục</label>
        </td>
        <td>
            <select name="category" class="selectpicker" data-live-search="true">
                <?php
                    foreach ($list_category as $category) {
                        if ($category->id == $poetic->category_id) {
                            echo '"<option value="'. $category->id . '"' ." selected>$category->caption</option>";
                        } else {
                            echo '"<option value="'. $category->id . '"' .">$category->caption</option>";
                        }

                    }
                ?>
            </select>
        </td>
    </tr>
    <tr>
        <td style="vertical-align: middle; width: 100px;">
            <label for="danh_muc">Tên bài thơ</label>
        </td>
        <td>
            <input type="text" name="poetic_caption" value="<?php echo $poetic->caption ?>" class="form-control" placeholder="Nhập tên bài thơ" aria-describedby="basic-addon1">
        </td>
    </tr>
    <tr>
        <td style="vertical-align: middle; width: 100px;">
            <label for="danh_muc">Nội dung</label>
        </td>
        <td>
            <textarea name="poetic_content" class="form-control" rows="10" placeholder="Nhập nội dung"><?php echo $poetic->content ?></textarea>
        </td>
    </tr>
    <tr>
        <th colspan="2">
            <input type="submit" name="btnUpdate" class="btn btn-primary" value="Cập nhật"></input>
        </th>
    </tr>
</table>
</form>

<script>
    $('.selectpicker').selectpicker();
    $('.selectpicker').selectpicker({
        style: 'btn-info',
        size: 10
    });
</script>
